package com.example.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.po.SysUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface SysUserDao extends BaseMapper<SysUser> {

    @Select("select * from sys_user where id in (select user_id from sys_user_ip where ip =#{ip})")
    public SysUser getUserByIp(@Param("ip") String ip);
}
